package com.ailk.kbi.kbiwarden.wsi.util


import com.ailk.kbi.kbiwarden.wsi.type.request.ConditionsType
import com.ailk.kbi.kbiwarden.wsi.type.response.ResultType;
import com.ailk.kbi.kbiwarden.wsi.vo.QueryVO



class SynUtil {
	static ResultType getSynDate(String dataBaseName, String tableName,ConditionsType conditions){
		DataUtil dataUtil = new DataUtil();
		QueryVO queryVO = dataUtil.getQueryVO(dataBaseName, tableName, conditions)
		int maxCount = dataUtil.getMaxCountResult(queryVO)		
		if(maxCount>100){
			throw new Exception("结果超过100条记录，请用异步接口获取数据。")
		}

		ResultType result = dataUtil.getDataXML(queryVO);
		result
	}
}
